<template>
  <div class="confirm_layer add_task" v-if="show">
      <h2>确认已完成？</h2>
      <label><button class="click_bt" @click="confirm">确认</button></label>
      <label><button class="click_bt" @click="cancel">取消</button></label>
  </div>
</template>

<script>
export default {
    name:"ConfirmLayer",
    props: ["show","isConfirm"],
    methods:{
        confirm(){
            console.log('确认')
            //this.$emit("update:isConfirm",true);
            this.$emit("update:show",false);
            this.$emit("if-confirm",this.$task)
        },
        cancel(){
            console.log('取消')
            //this.$emit("update:isConfirm",false);
            this.$emit("update:show",false);
            this.$emit("if-confirm",this.$task)
        },
        congottask(task){
          this.$task = task;
        }
    }
}
</script>

<style scoped>
.add_task{
    padding: 10px 0 40px 0;
}
.add_task p input{
    width: 75%;
    height: 20px;
    font-size: 15px;
}
.add_task label button{
    font-size: 18px;
    margin: 0 20px;
}
</style>